import { http } from "@/utils/http";
import { baseUrlApi } from "./utils";

type homeResult = {
  page: any;
  result: any
};

/** 查询banner列表 */
export const getselbanner = () => {
  return http.request<homeResult>("get", baseUrlApi(`/secbackend/homepage/selbanner`));
};



/** 新增banner图 */
export const insertbanner = (data?: object) => {
  return http.request<homeResult>("post", baseUrlApi("/secbackend/homepage/insertbanner"), { data });
};

/** 修改banner图 */
export const updatebanner = (data?: object) => {
  return http.request<homeResult>("post", baseUrlApi("/secbackend/homepage/updatebanner"), { data });
};


/** 删除banner图 */
export const delbanner = (userid?: string | number) => {
  return http.request<homeResult>("delete", baseUrlApi(`/secbackend/homepage/delbanner/${userid}`));
};